
import './App.css';

import{Route,Routes,Navigate} from 'react-router-dom'
import Login from './pages/Login/';
import Register from './pages/Register/';
import Main from './contair/Main/'
import {Provider} from 'react-redux'
import store from './store/'
function App() {

  return ( 
    <div>
      <Provider store={store}>
        <Routes> 
          <Route path="/login"   element={<Login></Login>}></Route>
          <Route path='/register'  element={<Register></Register>}></Route>
          <Route path='/main/*'     element={<Main></Main>}></Route>
          {/*v6中的重定向 */}
          <Route path="/" element={<Navigate replace to="/main" />} />
        </Routes>
      </Provider> 
    </div>
  )
  
} 

export default App;
